package com.yuandian.management.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yuandian.api.management.entity.ConfMpAbility;
import com.yuandian.api.management.po.ConfMpServiceParams;
import com.yuandian.bpm.common.data.datascope.BpmBaseMapper;
import com.yuandian.api.management.entity.ConfMpService;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;

/**
 * 中台监控-服务配置表-Mapper接口
 * @author zfsn
 * @date 2023-4-18
 */
@Mapper
public interface ConfMpServiceMapper extends BpmBaseMapper<ConfMpService> {

    /**
     * 根据条件查询能力服务
     * @param params
     * @return
     */
    public List<ConfMpService> selectAbilityServer(@Param("page") IPage<ConfMpService> page, @Param("params") ConfMpServiceParams params);

    /**
     * 根据条件查询能力服务(URL、资源编码)
     * @param params
     * @return
     */
    public List<ConfMpService> selectAbilityServerByResource(@Param("page") IPage<ConfMpService> page, @Param("params") ConfMpServiceParams params);

    /**
     * 查询单位编码及单位名称
     * @return
     */
    public List<Map<String, String>> selectOrg();

    /**
     * 查询系统Id及单位编码
     * @return
     */
    public List<ConfMpAbility> selectAbility();

    /**
     * 查询系统Id及系统名称
     * @return
     */
    public List<Map<String, String>> selectSystem();

	/**
	 * 更新服务量纲信息
	 * @param confMpService 服务对象
	 * @return	更新状态
	 */
	int updateDimensionById(ConfMpService confMpService);
}